<template>
	<div>
		<div class="recommend-title">热销推荐</div>
		<ul>
			<router-link tag="li" :to="'/detail/'+ item.id"  class="item" v-for="item of list":key="item.id" >
				<img :src="item.imgUrl" class="item-img">
				<div class="item-info">
					<p class="item-title" >{{item.title}}</p>
					<p class="item-desc" >{{item.desc}}</p>
					<button class="item-button">查看详情</button>
				</div>
			</router-link>
		</ul>
	</div>
</template>

<script type="text/javascript">
	export default {
			name: 'HomeRecommend',
			props: {
				list: Array
			},
			data () {
				return {
				// 	recommendList: [{
				// 	id: '0001',
				// 	imgUrl: 'http://img1.qunarzz.com/sight/p0/1410/21/67f72f6b54ede94fae27e32d6ba92ae5.jpg_200x200_e85f5596.jpg',
				// 	title: '南昌天沐温泉',
				// 	desc: '浪漫大厦首站，浪漫的海洋主题乐园',
				// },
				// {
				// 	id: '0002',
				// 	imgUrl: 'http://img1.qunarzz.com/sight/p0/1610/83/83a873f755d64992a3.water.jpg_200x200_f7acbacd.jpg',
				// 	title: '南昌万达主题乐园',
				// 	desc: '浪漫大厦首站，浪漫的海洋主题乐园'
				// },
				// {
				// 	id: '0003',
				// 	imgUrl: 'http://img1.qunarzz.com/sight/p0/1701/c0/c0899de1bcef6f9a3.img.jpg_200x200_b5b00164.jpg',
				// 	title: '南昌新中原大剧院',
				// 	desc: '浪漫大厦首站，浪漫的海洋主题乐园'
				// }],
				}
			}
	};
</script>

<style lang="stylus" scoped>
	@import '~styles/mixins.styl'
	.recommend-title
		line-height: .8rem
		background: #eee
		text-indent: .2rem
	.item
		overflow: hidden
		height: 1.9rem
		line-height: 1.9rem
		display: flex
		padding: .2rem
		.item-img
			width: 2rem
			height: 2rem
			float: left
		.item-info
			flex: 1
			flex-direction: column 
			padding-left: .22rem
			min-width: 0
			.item-title
				margin-top: .26rem
				height: .44rem
				color: #212121
				font-size: .32rem
				line-height: .44rem
				ellipsis()
			.item-desc
				margin-top: .14rem
				color: #ccc
				font-size: .32rem
				line-height: .44rem
				ellipsis()
			.item-button
				line-height: .44rem
				background: #ff9300
				margin-top: -1rem
				border-radius: .06rem
				color: #Fff
				padding: 0 .2rem
</style>